package com.ruoyi.common.enums;

public enum AttachementType {

    LETTER_ATTACHEMENT(1, "来信事项登记附件-卷宗"),
    LETTER_ORIGIN_ATTACHEMENT(2, "来信事项登记附件-群众来信原件"),
    ;

    private final Integer code;
    private final String desc;

    AttachementType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static AttachementType getCode(Integer code) {
        for (AttachementType type : values()) {
            if (type.code == code) {
                return type;
            }
        }
        return null;
    }
}
